<?php

namespace App\Http\Middleware;

use App\Services\AliyunLogService;
use Closure;
use Symfony\Component\HttpFoundation\Request;

class AliyunLogSaveMiddleware
{
    public function handle(Request $request, Closure $next)
    {
        $response = $next($request);

        /**
         * @var $logService AliyunLogService
         */
        $logService = app('AliyunLog');
        $logService->push();

        return $response;
    }
}
